   #!/bin/bash
   
   # 设置网站目录变量
   SITE_PATH="/www/wwwroot/dkc.lovedyt.cn"
   
   # 确保目标目录存在
   mkdir -p ${SITE_PATH}/public/storage
   
   # 同步文件
   cp -rf ${SITE_PATH}/storage/app/public/* ${SITE_PATH}/public/storage/
   
   # 设置正确的权限
   chmod -R 755 ${SITE_PATH}/public/storage
   chown -R www:www ${SITE_PATH}/public/storage
   
   # 记录同步时间
   echo "Storage synced at $(date)" >> ${SITE_PATH}/storage/logs/storage_sync.log